package com.itheima.FileTest;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class ArrayCopy {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\传智黑马javaEE开发习题答案\\练习\\Demo2.java");
        FileOutputStream fos =new FileOutputStream("D:\\传智黑马javaEE开发习题答案\\练习2\\Demo2.java");

        byte[] bytes = new byte[1024];
        int len;
        while((len = fis.read(bytes)) != -1){
            fos.write(bytes,0,len);
        }

        fis.close();
        fos.close();
    }
}
